package com.mtzqc.common.init.impl

import android.app.Application
import com.didi.drouter.annotation.Service
import com.mtzqc.common.BuildConfig
import com.mtzqc.common.init.InitService
import com.mtzqc.common.task.ITask
import com.mtzqc.net.RxConfig
import me.jessyan.autosize.AutoSizeCompat
import me.jessyan.autosize.AutoSizeConfig

@Service(function = [InitService::class], priority = 10)
class RxHttpRegister : InitService {
    override val depName: String
        get() = "RxHttp"
    override val dependsLib: Array<Class<out ITask>>?
        get() = null
    override val depends: Array<String>?
        get() = null

    override fun mainThread(): Boolean {
        return false
    }

    override val priority: Int
        get() = 10

    override fun executeInit(app: Application, debug: Boolean, dev: Boolean): Boolean {
        RxConfig.initRxHttp(BuildConfig.baseUrl, debug)
        return true
    }
}